<?php
include_once('config.php');
include_once($war_root.'/lib/libs.php');
include_once($war_root.'/lib/lwa.php');
$pun_user = array();
check_cookie($pun_user);

if($pun_user["is_guest"]) {

echo 'Please login at <a href="'.$pun_http.'">'.$forum_name.'</a> to access wardkp.';

   exit;
}
$forum_id = $pun_user["id"];
$sql = "SELECT * FROM wm_systems left join wm_characters on wm_characters.character_system_id = wm_systems.system_id where wm_characters.character_forum_id = '$forum_id' and wm_characters.character_active = 1";
$result = $db->query($sql);

$system = $db->fetch_assoc($result);

$sql = "select * from wm_characters where wm_characters.character_forum_id = '$forum_id' and wm_characters.character_active = 1";
$result = $db->query($sql);

$character = $db->fetch_assoc($result);

if($character["character_admin"] == 1) {
	$is_admin = 1;
}

?>
